package gdr.dev;


import com.golden.gamedev.Game;
import com.golden.gamedev.GameLoader;

import gdr.window.mainPage.*;

import java.awt.Graphics2D;
import java.awt.Dimension;

import gdr.battle.core.*;
/**
 * Classe d'avvio dell'applicazione
 * @author Giorgio Vitale
 *
 */
public class SuperGDR9000 extends Game{
	public static final String VERSIONE_GIOCO = "0.1beta";
	
	protected MainWindow mainWindow;
	protected BattleContainer container;
	
	public void initResources() {
    	setFPS(50);
    	container = (new RandomGenerator()).getContainer(this);
    	//mainWindow = new MainWindow(this);
    }

    public void update(long elapsedTime) {
    	//mainWindow.update(elapsedTime);
    	container.update(elapsedTime);
    }

    public void render(Graphics2D g) {
    	container.render(g);
    	//mainWindow.render(g);
    }
	
	public static void main(String[] args){
		new gdr.io.MyLogger();
		java.util.logging.Logger log = java.util.logging.Logger.getLogger("log");
		log.fine("Avvia il gioco.");
		
		GameLoader game = new GameLoader();
        game.setup(new SuperGDR9000(), new Dimension(640,480), false);
        game.start();
	}

}